// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

/**
 * Enum for road object orientation.
 */
enum class FWorldRoadObjectOrientation
{
	None,
	Positive,
	Negative
};

inline FWorldRoadObjectOrientation FWorldRoadObjectOrientationFromJson(const json& j)
{
	if (j == "none")	return FWorldRoadObjectOrientation::None;
	if (j == "+")		return FWorldRoadObjectOrientation::Positive;
	if (j == "-")		return FWorldRoadObjectOrientation::Negative;
	return FWorldRoadObjectOrientation::None;
}

inline json FWorldRoadObjectOrientationToJson(FWorldRoadObjectOrientation p)
{
	if (p == FWorldRoadObjectOrientation::None)		return "none";
	if (p == FWorldRoadObjectOrientation::Positive)	return "+";
	if (p == FWorldRoadObjectOrientation::Negative)	return "-";
	return "none";
}

inline void from_json(const json& j, FWorldRoadObjectOrientation& p)
{
	p = FWorldRoadObjectOrientationFromJson(j);
}

inline void to_json(json& j, const FWorldRoadObjectOrientation& p)
{
	j = FWorldRoadObjectOrientationToJson(p);
}
